home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 010 / vampire.bas < prev    next >
BASIC Source File  |  1988-11-09  |  8KB  |  173 lines

  1. 100 KEY OFF:CLS:COLOR 10,0
  2. 110 PRINT,"Welcome to the VAMPIRE'S CASTLE Adventure":PRINT:PRINT
  3. 112 INPUT "Do you need the instructions";A$:A$=LEFT$(A$+" ",1)
  4. 114 IF A$="y" OR A$= "Y" THEN GOSUB 2000 ELSE PRINT
  5. 120 DIM D$(19),O$(31),L(25),P(19,6):L=1
  6. 130 FOR X=1 TO 19:READ D$(X):NEXT
  7. 140 DATA Entrance Hall,Study,Library,Armory,Tower
  8. 150 DATA Lower Tower,Chapel,Brick Fireplace
  9. 160 DATA Hidden Corridor,Secret Passage
  10. 170 DATA Underground Lake Chamber,Boat,Alchemist's Lab
  11. 180 DATA Storeroom,Overhang,Gallery,Antechamber,Vampire's Tomb
  12. 190 DATA Torture Chamber
  13. 200 FOR X=1 TO 31:READ O$(X):IF X>6 THEN READ L(X-6)
  14. 220 NEXT:T2=8:R=11:WS$="Wooden Stakes"
  15. 230 DATA North,South,East,West,"Up ",Down,Sledge Hammer,5
  16. 240 DATA Timepiece,1,Coil of Rope,9,Parchment Scroll,3,Axe,4,Oar,6,Key,99
  17. 250 DATA Holywater,7,Flask of Oil,13,Crate,14,Bucket,14
  18. 260 DATA Torch,8,Nails,15,Tapestry,16,Boat,11,Rusty Door,17
  19. 270 DATA Closed Coffin,18,Fire in the Fireplace,2
  20. 280 DATA Bookcase,3,Sign,1,Parapets,5,Brick Fireplace,2
  21. 290 DATA Rat,19,Wine,2,Cheddar Cheese,2
  22. 300 FOR Y=1 TO 19:FOR X=1 TO 6:READ P(Y,X):NEXT X,Y
  23. 310 DATA ,,3,2,,,,,1,,,,,,4,1,,,,,5,3,,,,,,4,,,,7,,,5,,6,,,,4,
  24. 320 DATA ,2,,,,,13,,,,3,,11,8,,19,,,,10,,,,,,11,,,,,14,9,,,,
  25. 330 DATA ,13,,,2,,,,,,,16,,,,,,,,16,,,,,,17,,,,,,,10,13,,
  26. 340 W$="GO GETLOODROHITOPETIEPUSKILOILROWCLITAKREATHRBRE"
  27. 350 N$="N  01S  02E  03W  04U  05D  06HAM07SCR10AX 11WAT14OIL15DOO22COF23VAM23FIR28"
  28. 355 O$="NORSOUEASWESUP DOWSLETIMROPPARAXEOARKEYHOLFLACRABUCTORNAITAPBOARUSCLOFIRBOOSIGPARBRIRATWINCHE"
  29. 360 COLOR 2,0:PRINT "You are in the ";D$(L):Y=0:L2=L
  30. 370 IF L(12)= 0 OR L< 10 OR (L> 12 AND L< > 18)THEN 390
  31. 380 PRINT "It's Dark! you can't see":GOTO 440
  32. 390 PRINT "You see ";:FOR X=1 TO 25:IF L(X)=L2 THEN PRINT O$(X+ 6);", ";:Y=Y+1
  33. 400 NEXT:IF Y=0 THEN PRINT "nothing interesting." ELSE PRINT CHR$(29)CHR$(29)" "
  34. 420 PRINT "Obvious exits are: ";:FOR X=1 TO 6:IF P(L,X)>0 THEN PRINT O$(X);" ";
  35. 430 NEXT:PRINT
  36. 440 S=0:F=0:COLOR 10,0:PRINT:INPUT "What do you want to do";A$:PRINT:COLOR 2
  37. 450 A$=A$:B$="   ":FOR X=1 TO LEN(A$)
  38. 460 IF MID$(A$,X,1)=" " THEN B$=MID$(A$+"   ",X+1,3)
  39. 490 NEXT:IF LEN(A$)=1 THEN B$=A$+"  ":A$="GO "
  40. 500 GOSUB 1800:L2=L:T1=T1+1:IF T1=60 THEN T1=0:T2=T2+1
  41. 510 IF T2=12 THEN COLOR 7,0                                                         :PRINT " It's midnight: the Vampire is awake, He's at your neck ";:GOTO 1750
  42. 520 IF A$="SWI" AND L=11 THEN COLOR 7,0                                             :PRINT " You have Drowned in the ice cold water ";:GOTO 1750
  43. 530 X=INSTR(N$,B$):IF X MOD 5 = 1 THEN S=VAL(MID$(N$,X+3,2)):GOTO 590
  44. 560 X=INSTR(O$,B$):IF X MOD 3 = 1 THEN S=(X+2)/3
  45. 590 X=INSTR(W$,A$):IF X MOD 3 = 1 THEN F=(X+2)/3
  46. 620 IF F>11 THEN F=F-11
  47. 630 IF A$<>"INV" THEN 680
  48. 640 PRINT "You are carrying: ";:A=0:FOR X=1 TO 25
  49. 650 IF L(X)=0 THEN PRINT O$(X+6)", ";:A=A+1
  50. 660 NEXT:IF A=0 THEN PRINT "nothing";
  51. 670 PRINT:GOTO 440
  52. 680 ON F GOTO 720,890,1100,1240,1300,1390,1480,1560,1610,1680,1720
  53. 690 PRINT "I don't know how to do that":GOTO 440
  54. 700 PRINT "I don't know that word":GOTO 440
  55. 710 REM  -GO-
  56. 720 IF S<1 OR S>6 THEN 760
  57. 730 IF P(L,S)>0 THEN L=P(L,S):GOTO 360
  58. 740 PRINT "You can't go that way":GOTO 440
  59. 750 PRINT "You see nothing special":GOTO 440
  60. 760 IF S<>28 OR L<>2 THEN 790
  61. 770 IF FI=0 THEN COLOR 0,7:PRINT " You have Burned to Death ";:GOTO 1750
  62. 780 L=8:GOTO 360
  63. 790 IF S<>27 OR L<>5 THEN 820
  64. 800 IF LEFT$(O$(27),1)="R" THEN L=6:PRINT "Climbed down rope":PRINT:GOTO 360
  65. 810 COLOR 0,7:PRINT " You fell and Died ";:GOTO 1750
  66. 820 IF S=21 AND L(15)=L THEN L=12:GOTO 360
  67. 830 IF L=16 AND B$="OVE" THEN 860
  68. 840 IF S<1 THEN 700
  69. 850 PRINT "You can't go there":GOTO 440
  70. 860 IF L(10)=L AND O$(16)="Crate" THEN L=15:GOTO 360
  71. 870 PRINT "It's a little too high":GOTO 440
  72. 880 REM  -GET-
  73. 890 IF S<7 THEN GOTO 700
  74. 900 IF C>6 THEN PRINT "You can't carry any more":GOTO 440
  75. 910 IF L(S-6)<>L THEN 1070
  76. 920 IF S<>14 THEN 960
  77. 940 V$="In":GOSUB 1850:IF A$="BUC" AND L(11)=0 THEN 1080
  78. 950 PRINT "You can't do that":GOTO 440
  79. 960 IF S<>20 THEN 990
  80. 970 IF TA=0 THEN PRINT "It's nailed to an overhang":GOTO 440
  81. 980 P(16,1)=17:PRINT "AHA! - A hole in the wall":PRINT:GOTO 1080
  82. 990 IF S<>19 THEN 1020
  83. 1000 IF L(1)<>0 THEN PRINT "You have no hammer":GOTO 440
  84. 1010 IF L(13)=15 THEN TA=1:PRINT "The tapestry is loose":GOTO 1080
  85. 1020 IF S<>13 THEN 1050
  86. 1030 L(23)=L:IF L(25)=L THEN 1080
  87. 1040 PRINT "The Rat has it":GOTO 440
  88. 1050 IF S>20 AND S<30 THEN PRINT "You can't get it":GOTO 440 ELSE 1080
  89. 1070 PRINT "I don't see any "O$(S):GOTO 440
  90. 1080 C=C+1:L(S-6)=0:PRINT "You got the "O$(S):GOTO 440
  91. 1090 REM  -LOOK-
  92. 1100 IF S<7 THEN 360
  93. 1120 IF S=26 AND L=1 THEN PRINT "'The Vampire Wakes at Midnight'":GOTO 440
  94. 1130 IF S<>29 THEN 1160
  95. 1140 IF L(23)<>L THEN 1070
  96. 1150 PRINT "A Key is in it's mouth!":L(7)=L:GOTO 440
  97. 1160 IF S<>10 THEN 1200
  98. 1170 IF L(4)=0 THEN 1190
  99. 1180 PRINT "You don't have it":GOTO 440
  100. 1190 PRINT "The Scroll reads: 'Not all exits are obvious.'":GOTO 440
  101. 1200 IF S<>8 THEN 750
  102. 1210 IF L(2)<>0 THEN 1180
  103. 1220 PRINT USING "The time is now ##:##";T2,T1:GOTO 440
  104. 1230 REM  -DROP-
  105. 1240 IF S<7 THEN GOTO 700
  106. 1250 IF L(S-6)<>0 THEN 1180
  107. 1260 IF S<>14 OR L<>2 THEN 1280
  108. 1270 O$(24)="Smoldering Ashes":FI=1:L(8)=99:C=C-1:GOTO 360
  109. 1280 PRINT "Okay, the "O$(S)" is on the "D$(L)" floor":L(S-6)=L:C=C-1:GOTO 440
  110. 1290 REM  -HIT-
  111. 1300 IF S<7 THEN 700
  112. 1310 IF L(S-6)<>L AND (L<>8 OR S<>28) THEN 1070
  113. 1330 V$="With":GOSUB 1850:IF A$<>"AXE" OR S<>16 OR L(5)<>0 THEN 1350
  114. 1340 O$(16)=WS$:N$=N$+"WOO16STA16":GOTO 360
  115. 1350 IF (A$<>"SLE" AND A$<>"HAM") OR S<>28 OR L(1)<>0 THEN 1370
  116. 1360 O$(28)="Broken Fireplace":P(8,1)=10:D$(8)=O$(28):GOTO 360
  117. 1370 PRINT "Nothing happened":GOTO 440
  118. 1380 REM  -OPEN-
  119. 1390 IF S<7 THEN 700
  120. 1400 IF L(S-6)<> L THEN 1070
  121. 1410 IF S<>23 THEN 1440
  122. 1420 IF L(7)<>0 THEN PRINT "The coffin is locked ... ";:GOTO 1370
  123. 1430 O$(23)="Vampire in the Coffin":GOTO 360
  124. 1440 IF S<>22 THEN 1370
  125. 1450 IF OI=0 THEN PRINT "Too much rust ... ";:GOTO 1370
  126. 1460 O$(22)="Open Door":P(17,1)=18:GOTO 360
  127. 1470 REM  -TIE-
  128. 1480 IF S<7 THEN 700
  129. 1490 IF L(S-6)<>0 THEN 1180
  130. 1500 IF S<>9 THEN 950
  131. 1520 V$="To":GOSUB 1850:IF A$<>"PAR" THEN 950
  132. 1530 L(3)=99:C=C-1:O$(27)="Rope tied to the Parapet":N$=N$+"ROP27"
  133. 1540 PRINT O$(27);"!":GOTO 440
  134. 1550 REM  -PUSH-
  135. 1560 IF S<7 THEN 700
  136. 1570 IF L(S-6)<>L THEN 1070
  137. 1580 IF S<>25 THEN 1370
  138. 1590 PRINT "Aha! - You have revealed a Doorway":PRINT:P(L,6)=9:GOTO 360
  139. 1600 REM  -KILL-
  140. 1610 IF S<7 THEN 700
  141. 1620 IF S<>23 OR LEFT$(O$(23),1)<>"V" THEN 950
  142. 1630 V$="With":GOSUB 1850
  143. 1640 IF (A$="WOO" OR A$="STA") AND L(10)=0 AND O$(16)=WS$ THEN 1660
  144. 1650 COLOR 0,7:PRINT " You Failed!  The Vampire awakes and sucks your Blood! ";      :GOTO 1750
  145. 1660 COLOR 26:PRINT "Congratulations!  You have killed the Vampire":GOTO 1750
  146. 1670 REM  -OIL-
  147. 1680 IF L(9)<>0 OR L<>17 OR S<>22 THEN 950
  148. 1690 PRINT "The Door squeaks Open":PRINT
  149. 1700 OI=1:O$(22)="Open Door":P(17,1)=18:GOTO 360
  150. 1710 REM  -ROW-
  151. 1720 IF L<>12 OR L(6)<>0 THEN 950
  152. 1730 R=27-R:L=R:PRINT "You have rowed to the ";D$(L)
  153. 1740 PRINT:L(15)=L:GOTO 360
  154. 1750 COLOR 10,0:PRINT:PRINT:INPUT "Would you like to try again";A$:GOSUB 1800
  155. 1760 IF LEFT$(A$,1)="Y" THEN RUN 100
  156. 1770 IF LEFT$(A$,1)="R" THEN T1=T1-2:GOTO 440
  157. 1780 KEY ON:END
  158. 1800 REM  - MAKE INPUT U/C -
  159. 1810 A$=LEFT$(A$+"   ",3):FOR I=1 TO 3
  160. 1820 CH=ASC(MID$(A$,I,1)):IF CH>96 THEN MID$(A$,I,1)=CHR$(CH-32)
  161. 1830 CH=ASC(MID$(B$,I,1)):IF CH>96 THEN MID$(B$,I,1)=CHR$(CH-32)
  162. 1840 NEXT:RETURN
  163. 1850 REM - GET "WHAT" -
  164. 1860 COLOR 10:PRINT TAB(40);CHR$(30);CHR$(30);:PRINT "-- "V$" what";:INPUT A$
  165. 1870 COLOR 2:PRINT:GOSUB 1800:RETURN
  166. 2000 PRINT:PRINT:COLOR 2
  167. 2010 PRINT "VAMPIRE'S CASTLE has a concealed goal.  You learn what the goal is"
  168. 2020 PRINT "by exploring your surroundings.  The computer will act as your eyes"
  169. 2030 PRINT "and hands.  It will accepts short phrases as commands and assumes"
  170. 2040 PRINT "that the first word is a verb and the last word is the object."
  171. 2050 PRINT "For example: READ THE SIGN.  The computer has a vocabulary of about"
  172. 2060 PRINT "70 words.  Some of the more important words you should know before"
  173. 2070 PRINT "you start ≡lay